package com.ys.openapi.process;

import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;

import java.util.HashMap;
import java.util.Map;

/**
 * 发起流程实体类
 */
public class RequestStartProcess {

          private String workflowCode;//流程模板编码": "pay",
           private String   workItemId="null";//": null,
          private String workflowInstanceId="null";//流程实例id": null,
          /*"bizObject": {
                "id": "d2768b0e1caa427b958de968a6655efe",业务id
                "data": {
                           "ShortText1628921911277": "22",
                           "id": "d2768b0e1caa427b958de968a6655efe"//业务id
                       },
                "schemaCode": "pay",流程模板编码"
                "sheetCode": "pay",流程模板编码"
                "workflowInstanceId": null
            },*/
            private boolean agree=true;//": true,
            private String actionCode="submit";//: "submit",
            private String depatmentId;//": "2c2c80867ab40ee9017aca0657a30636",
            private String formType="1";//: "1",
            private String replayToken;//": "REPLAY18b51239562b457baa1288be36201d07"
            private BizObject bizObject ;//业务对象
    public static void main(String[] args) {
        RequestStartProcess rsp=new RequestStartProcess();
        rsp.setWorkflowCode("pay");
        rsp.setReplayToken("REPLAY18b51239562b457baa1288be36201d07");
        BizObject bizObject=new BizObject();
        bizObject.setId("ddd");
        bizObject.setSchemaCode("pay");
        bizObject.setSheetCode("pay");
        Map<String,String>map=new HashMap<>();
        map.put("id","dddd");
       // bizObject.setData(map);
        rsp.setBizObject(bizObject);
        System.out.println(JSON.toJSONString(rsp));
    }
    public String getWorkflowCode() {
        return workflowCode;
    }

    public void setWorkflowCode(String workflowCode) {
        this.workflowCode = workflowCode;
    }

    public String getWorkItemId() {
        return workItemId;
    }

    public void setWorkItemId(String workItemId) {
        this.workItemId = workItemId;
    }

    public String getWorkflowInstanceId() {
        return workflowInstanceId;
    }

    public void setWorkflowInstanceId(String workflowInstanceId) {
        this.workflowInstanceId = workflowInstanceId;
    }

    public boolean isAgree() {
        return agree;
    }

    public void setAgree(boolean agree) {
        this.agree = agree;
    }

    public String getActionCode() {
        return actionCode;
    }

    public void setActionCode(String actionCode) {
        this.actionCode = actionCode;
    }

    public String getDepatmentId() {
        return depatmentId;
    }

    public void setDepatmentId(String depatmentId) {
        this.depatmentId = depatmentId;
    }

    public String getFormType() {
        return formType;
    }

    public void setFormType(String formType) {
        this.formType = formType;
    }

    public String getReplayToken() {
        return replayToken;
    }

    public void setReplayToken(String replayToken) {
        this.replayToken = replayToken;
    }

    public BizObject getBizObject() {
        return bizObject;
    }

    public void setBizObject(BizObject bizObject) {
        this.bizObject = bizObject;
    }

    @Override
    public String toString() {
        return "{" +
                "workflowCode='" + workflowCode + '\'' +
                ", workItemId='" + workItemId + '\'' +
                ", workflowInstanceId='" + workflowInstanceId + '\'' +
                ", agree=" + agree +
                ", actionCode='" + actionCode + '\'' +
                ", depatmentId='" + depatmentId + '\'' +
                ", formType='" + formType + '\'' +
                ", replayToken='" + replayToken + '\'' +
                ", bizObject=" + bizObject +
                '}';
    }


}

